"""
break 停止循环
"""

# 1.初始化计数器
# 2.判断计数器
# 3.修改计数器

# a = 1
# while a <= 5:
#     print(f"吃第{a}个苹果")
#     if a == 3:
#         break
#     a = a + 1

a = 1
while a <= 10:
    print(f"小猪佩奇跳了{a}次水坑")
    if a == 2:
        break
    a += 1